package com.shanghaionstar.mro.util;

import android.content.Context;

import com.shanghaionstar.R;

public enum WeatherType {
	SNOWSTORM,
	RAINSTORM,
	RAINSTORM_TURN_HEAVYRAINSTORM, 
	SQUALL, 
	HEAVYRAINSTORM, 
	HEAVYRAINSTORM_TURN_MOSTRAINSTORM, 
	HEAVYSNOW,
	HEAVYSNOW_TURN_SNOWSTORM,
	HEAVYRAIN,
	HEAVYRAIN_TURN_RAINSTORM,
	FREEZINGRAIN,
	CLOUDY,
	DUST,
	THUNDERSHOWER,
	THUNDERSHOWER_HAIL,
	TORNADO,
	HAZE,
	STRONG_SANDSTORM,
	MIST,
	SUNNY,
	BLOWINGSNOW,
	SANDSTORM,
	MOSTRAINSTORM,
	FOG,
	SLIGHTSNOW,
	SLIGHTSNOW_TURN_SNOW,
	LIGHTRAIN,
	LIGHTRAIN_TURN_RAIN,
	BLOWINGSAND,
	OVERCAST,
	RAIN_SNOW,
	SNOWSHOWER,
	SHOWER,
	SNOW,
	SNOW_TURN_HEAVYSNOW,
	RAIN,
	RAIN_TURN_HEAVYRAIN;
	public static WeatherType getWeatherTypeByDesc(String desc, Context context) {
		if(desc.contains(context.getString(R.string.mro_snowstorm))){
			return WeatherType.SNOWSTORM;
		}else if(desc.contains(context.getString(R.string.mro_rainstorm))){
			return WeatherType.RAINSTORM;
		}else if(desc.contains(context.getString(R.string.mro_rainstorm_turn_heavyrainstorm))){
			return WeatherType.RAINSTORM_TURN_HEAVYRAINSTORM;
		}else if(desc.contains(context.getString(R.string.mro_squall))){
			return WeatherType.SQUALL;
		}else if(desc.contains(context.getString(R.string.mro_heavyrainstorm))){
			return WeatherType.HEAVYRAINSTORM;
		}else if(desc.contains(context.getString(R.string.mro_heavyrainstorm_turn_mostrainstorm))){
			return WeatherType.HEAVYRAINSTORM_TURN_MOSTRAINSTORM;
		}else if(desc.contains(context.getString(R.string.mro_heavysnow))){
			return WeatherType.HEAVYSNOW;
		}else if(desc.contains(context.getString(R.string.mro_heavysnow_turn_snowstorm))){
			return WeatherType.HEAVYSNOW_TURN_SNOWSTORM;
		}else if(desc.contains(context.getString(R.string.mro_heavyrain))){
			return WeatherType.HEAVYRAIN;
		}else if(desc.contains(context.getString(R.string.mro_heavyrain_turn_rainstorm))){
			return WeatherType.HEAVYRAIN_TURN_RAINSTORM;
		}else if(desc.contains(context.getString(R.string.mro_freezingrain))){
			return WeatherType.FREEZINGRAIN;
		}else if(desc.contains(context.getString(R.string.mro_cloudy))){
			return WeatherType.CLOUDY;
		}else if(desc.contains(context.getString(R.string.mro_dust))){
			return WeatherType.DUST;
		}else if(desc.contains(context.getString(R.string.mro_thundershower))){
			return WeatherType.THUNDERSHOWER;
		}else if(desc.contains(context.getString(R.string.mro_thundershower_hail))){
			return WeatherType.THUNDERSHOWER_HAIL;
		}else if(desc.contains(context.getString(R.string.mro_tornado))){
			return WeatherType.TORNADO;
		}else if(desc.contains(context.getString(R.string.mro_haze))){
			return WeatherType.HAZE;
		}else if(desc.contains(context.getString(R.string.mro_strong_sandstorm))){
			return WeatherType.STRONG_SANDSTORM;
		}else if(desc.contains(context.getString(R.string.mro_mist))){
			return WeatherType.MIST;
		}else if(desc.contains(context.getString(R.string.mro_sunny))){
			return WeatherType.SUNNY;
		}else if(desc.contains(context.getString(R.string.mro_blowingsnow))){
			return WeatherType.BLOWINGSNOW;
		}else if(desc.contains(context.getString(R.string.mro_sandstorm))){
			return WeatherType.SANDSTORM;
		}else if(desc.contains(context.getString(R.string.mro_mostrainstorm))){
			return WeatherType.MOSTRAINSTORM;
		}else if(desc.contains(context.getString(R.string.mro_fog))){
			return WeatherType.FOG;
		}else if(desc.contains(context.getString(R.string.mro_slightsnow))){
			return WeatherType.SLIGHTSNOW;
		}else if(desc.contains(context.getString(R.string.mro_slightsnow_turn_snow))){
			return WeatherType.SLIGHTSNOW_TURN_SNOW;
		}else if(desc.contains(context.getString(R.string.mro_lightrain))){
			return WeatherType.LIGHTRAIN;
		}else if(desc.contains(context.getString(R.string.mro_lightrain_turn_rain))){
			return WeatherType.LIGHTRAIN_TURN_RAIN;
		}else if(desc.contains(context.getString(R.string.mro_blowingsand))){
			return WeatherType.BLOWINGSAND;
		}else if(desc.contains(context.getString(R.string.mro_overcast))){
			return WeatherType.OVERCAST;
		}else if(desc.contains(context.getString(R.string.mro_rain_snow))){
			return WeatherType.RAIN_SNOW;
		}else if(desc.contains(context.getString(R.string.mro_snowshower))){
			return WeatherType.SNOWSHOWER;
		}else if(desc.contains(context.getString(R.string.mro_shower))){
			return WeatherType.SHOWER;
		}else if(desc.contains(context.getString(R.string.mro_snow))){
			return WeatherType.SNOW;
		}else if(desc.contains(context.getString(R.string.mro_snow_turn_heavysnow))){
			return WeatherType.SNOW_TURN_HEAVYSNOW;
		}else if(desc.contains(context.getString(R.string.mro_rain))){
			return WeatherType.RAIN;
		}else if(desc.contains(context.getString(R.string.mro_rain_turn_heavyrain))){
			return WeatherType.RAIN_TURN_HEAVYRAIN;
		}else{
			return null;
		}
	}
}
